package test2.Operation;

import test2.Student;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Iterator;
import java.util.TreeMap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ling
 * Date: 2022-04-22
 * Time: 22:00
 */
public class OutFileOperation implements IOperation {


    @Override
    public void work(TreeMap<String, Student> treeMap) throws IOException {
        if(treeMap==null)
            return;
        FileReader reader=new FileReader("write.txt");
        int ch;
        while((ch=reader.read())!=-1){
            System.out.println((char)ch);
        }
        reader.close();
    }
}

